package org.zoomdev.zoom.dao.executor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class BatchResult {
    private final ArrayList<Object> items = new ArrayList<>();
    private int[] counts;

    public void add(Object data) {
        this.items.add(data);
    }

    public List<Object> getItems() {
        return items;
    }

    public int[] getCounts() {
        return counts;
    }

    public void setCounts(int[] counts) {
        this.counts = counts;
    }


    @Override
    public String toString() {
        return "更新总数量:" + items.size() + " 受到影响数量:" + Arrays.stream(counts).sum();
    }
}
